<!doctype html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>高校健康上报系统首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/png" th:href="@{/assets/images/icon/favicon.ico}">
    <link rel="stylesheet" th:href="@{/assets/css/bootstrap.mincopy.css}">
    <link rel="stylesheet" th:href="@{/assets/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/assets/css/themify-icons.css}">
    <link rel="stylesheet" th:href="@{/assets/css/metisMenu.css}">
    <link rel="stylesheet" th:href="@{/assets/css/owl.carousel.min.css}">
    <link rel="stylesheet" th:href="@{/assets/css/slicknav.min.css}">
    <!-- amchart css -->
    <link rel="stylesheet" th:href="@{/assets/css/export.css}" type="text/css" media="all"/>
    <!-- others css -->
    <link rel="stylesheet" th:href="@{/assets/css/typography.css}">
    <link rel="stylesheet" th:href="@{/assets/css/default-css.css}">
    <link rel="stylesheet" th:href="@{/assets/css/styles.css}">
    <link rel="stylesheet" th:href="@{/assets/css/responsive.css}">
    <!-- modernizr css -->
    <script th:src="@{assets/js/vendor/modernizr-2.8.3.min.js}"></script>

    <script type="text/javascript">

        function getKeyword(){

            var keyword=document.getElementById('searchKeyword');
            console.log(keyword);
            var form = document.getElementById('form');
            form.submit();

        }
    </script>

</head>

<body>

<div id="preloader">
    <div class="loader"></div>
</div>

<form id="form" th:action="@{/recordcon/searchAllRecord}" method="post">
    <div class="page-container">
        <input type="hidden" id="pageNumber" name="pageNum" value="1"/>
        <div class="sidebar-menu">
            <div class="sidebar-header">
                <div class="logo"></div>
            </div>
            <div class="main-menu">
                <div class="menu-inner" style="width: 100%; height: 500px; overflow: hidden;">
                    <nav>
                        <ul class="metismenu" id="menu">
                            <li class="active">
                                <a href="javascript:void(0)" aria-expanded="true"><i
                                        class="ti-dashboard"></i><span>上报记录管理</span></a>
                                <ul class="collapse">
                                    <li class="active"><a th:href="@{/recordcon/checkRecordAll}">全部记录</a></li>
                                </ul>
                                <ul class="collapse">
                                    <li class="active"><a th:href="@{/recordcon/recordAnalysis}">记录分析</a></li>
                                </ul>
                                <ul class="collapse">
                                    <li class="active"><a th:href="@{/usercon/notDoUser}">未打卡用户</a></li>
                                </ul>
                            </li>

                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i
                                        class="fa fa-table"></i><span>用户管理</span></a>
                                <ul class="collapse">
                                    <li><a th:href="@{/usercon/User}">用户信息</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true"><i
                                        class="fa fa-table"></i><span>管理员信息</span></a>
                                <ul class="collapse">
                                    <li><a th:href="@{/usercon/AdUser}">管理员账号</a></li>
                                </ul>
                            </li>
                            <li><a th:href="@{/outLogin}"><i class="ti-map-alt"></i> <span>退出登录</span></a></li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
        <!-- sidebar menu area end -->
        <!-- main content area start -->
        <div class="main-content">
            <!-- header area start -->
            <div class="header-area">
                <div class="row align-items-center">
                    <!-- nav and search button -->
                    <div class="col-md-6 col-sm-8 clearfix">
                        <div class="nav-btn pull-left">
                            <span></span>
                            <span></span>
                            <span></span>
                        </div>
                        <div class="search-box pull-left">
                            <input type="text" id ="searchKeyword" name="searchKeyword" th:value="${searchKeyword}"
                                   required="required" th:placeholder="输入关键字搜索">
                            <div class="pagination_area pull-right ">
                                <ul>
                                    <li><a href="#" onclick='getKeyword()'>确定</a></li>
                                    <li><a th:href="@{/AllRecordExcel}" href="#">导出</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="main-content-inner">
                <div class="table-responsive">
                    <div class="table-responsive">
                        <table class="dbkit-table">
                            <tbody>
                            <tr align="center">
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=6,searchKeyword=${searchKeyword})}" href="#">id</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=7,searchKeyword=${searchKeyword})}" href="#">用户编号</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=8,searchKeyword=${searchKeyword})}" href="#">姓名</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=9,searchKeyword=${searchKeyword})}" href="#">手机号码</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=10,searchKeyword=${searchKeyword})}" href="#">紧急联系人</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=11,searchKeyword=${searchKeyword})}" href="#">紧急联系人手机号码</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=1,searchKeyword=${searchKeyword})}" href="#">身体状况</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=2,searchKeyword=${searchKeyword})}" href="#">是否隔离</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=3,searchKeyword=${searchKeyword})}" href="#">是否在校</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=12,searchKeyword=${searchKeyword})}" href="#">目前所在地</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=4,searchKeyword=${searchKeyword})}" href="#">体温</a></h4></td>
                                <td><h4><a th:href="@{/recordcon/searchAllRecord(id=5,searchKeyword=${searchKeyword})}" href="#">填写日期</a></h4></td>
                            </tr>
                            <tr th:each="r:${records}" align="center">
                                <td th:id="'id'+${r.getId()}" th:text="${r.getId()}"></td>
                                <td th:text="${r.getUid()}"></td>
                                <td th:text="${r.getName()}"></td>
                                <td th:text="${r.getPhone()}"></td>
                                <td th:text="${r.getNamefriend()}"></td>
                                <td th:text="${r.getPhonefriend()}"></td>
                                <td th:switch="${r.getBody()}">
                                    <span th:case="1">良好</span>
                                    <span th:case="2">发烧</span>
                                    <span th:case="3">咳嗽</span>
                                    <span th:case="4">头晕</span>
                                    <span th:case="5">腹泻</span>
                                    <span th:case="6">乏力</span>
                                    <span th:case="7">同时包含两种以上异常</span>
                                </td>
                                <td th:switch="${r.getHospital()}">
                                    <span th:case="1">隔离中</span>
                                    <span th:case="0">未隔离</span>
                                </td>
                                <td th:switch="${r.getSchool()}">
                                    <span th:case="1">不在校</span>
                                    <span th:case="0">在校</span>
                                </td>
                                <td th:text="${r.getAddress()}"></td>
                                <td th:text="${r.getTemperature()}"></td>
                                <td th:text="${r.getDate()}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

            </div>

        </div>
        <div class="pagination_area pull-right mt-5">
            <ul>
                当前是第<span th:text="${page.pageNum}" style="color: red;font-size: 14px;font-weight: bold"></span>页,
                总共<span th:text="${page.pages}" style="color: deepskyblue;font-size: 14px;font-weight: bold"></span>页,
                总记录<span th:text="${page.total}" style="color: purple;font-size: 14px;font-weight: bold"></span>条
                <li><a  th:onclick="'getPage(1)'" >首页</a></li>
                <li><a  th:onclick="'getPage('+${page.prePage}+')'" ><i class="fa fa-chevron-left"></i></a>
                </li>
                <li><a><span th:text="${page.pageNum}"></span></a></li>
                <li><a  th:onclick="'getPage('+${page.nextPage}+')'" ><i class="fa fa-chevron-right"></i></a>
                </li>
                <li><a  th:onclick="'getPage('+${page.pages}+')'" >尾页</a></li>
            </ul>
        </div>
    </div>
</form>
<script>
    function getPage(pageNo) {
        // 通过js 获取到隐藏域  然后修改其中的页码值发给后端
        document.getElementById("pageNumber").value = pageNo;
        // 通过js 提交表单 给后台
        document.getElementById("form").submit();
    }
</script>
<script th:src="@{/assets/js/vendor/jquery-2.2.4.min.js}"></script>
<script th:src="@{/assets/js/popper.min.js}"></script>
<script th:src="@{/assets/js/bootstrap.min.js}"></script>
<script th:src="@{/assets/js/owl.carousel.min.js}"></script>
<script th:src="@{/assets/js/metisMenu.min.js}"></script>
<script th:src="@{/assets/js/jquery.slimscroll.min.js}"></script>
<script th:src="@{/assets/js/jquery.slicknav.min.js}"></script>

<!-- start chart js -->
<script th:src="@{/assets/js/Chart.min.js}"></script>
<!-- start highcharts js -->
<script th:src="@{/assets/js/highcharts.js}"></script>
<!-- start zingchart js -->
<script th:src="@{/assets/js/zingchart.min.js}"></script>
<script>
    zingchart.MODULESDIR = "assets/js/modules/";
    ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];
</script>
<!-- all line chart activation -->
<script th:src="@{https://www.amcharts.com/lib/3/amcharts.js}"></script>
<script th:src="@{https://www.amcharts.com/lib/3/serial.js}"></script>
<script th:src="@{/assets/css/export.min.js}"></script>
<script th:src="@{https://www.amcharts.com/lib/3/themes/light.js}"></script>
<script th:src="@{/assets/js/bar-chart-main.js}"></script>
<script th:src="@{/assets/js/line-chart-main.js}"></script>
<!-- all pie chart -->
<script th:src="@{/assets/js/pie-chart.js}"></script>
<!-- others plugins -->
<script th:src="@{/assets/js/plugins.js}"></script>
<script th:src="@{/assets/js/scripts.js}"></script>

<script th:src="@{/assets/search.js}"></script>
<script th:src="@{/assets/order.js}"></script>
<script th:src="@{/assets/good.js}"></script>
</body>

</html>
